<?php /* Smarty version 2.6.18, created on 2010-03-09 17:06:07
         compiled from staffsbyview.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'staffsbyview.tpl', 17, false),)), $this); ?>
<table border="0" width="100%" style="padding-bottom:30px">
	<tr>
		<td><h2>Scheduled Trainings</h2></td>
		<td colspan="4" style="width: 100px; text-align: right" nowrap>
			<input type="button" value="New Schedule" onclick="showStaffTrainingList('<?php echo $this->_tpl_vars['staffId']; ?>
');" />
		</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<tr>
		<td>Course Title</td>
		<td>Skill Area</td>
		<td align="right">Training Date</td>
		<td>Trainor</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<?php $_from = $this->_tpl_vars['schedules']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['schedule']):
?>
	<tr class="<?php echo smarty_function_cycle(array('values' => 'blue,notify'), $this);?>
">
		<td>
			<a href="javascript:void(0);" onclick="editStaffTraining('<?php echo $this->_tpl_vars['schedule']['staff_training_id']; ?>
','<?php echo $this->_tpl_vars['staffId']; ?>
');" ><?php echo $this->_tpl_vars['schedule']['course_title']; ?>
</a>
		</td>
		<td><?php echo $this->_tpl_vars['schedule']['skill']; ?>
</td>
		<td align="right"><?php echo $this->_tpl_vars['schedule']['date_default_trained']; ?>
</td>
		<td><?php echo $this->_tpl_vars['schedule']['default_trainor']; ?>
</td>
	</tr>
	<?php endforeach; endif; unset($_from); ?>
	<tr><td colspan="4" style="padding-top:10px"><hr></td></tr>
</table>

<table border="0" width="100%" style="padding-bottom:30px">
	<tr>
		<td nowrap><h2>Skills and Competence</h2></td>
		<td colspan="4" style="width: 100px; text-align: right" nowrap>
			<input type="button" value="New Skill" onclick="editSkill('0','<?php echo $this->_tpl_vars['staffId']; ?>
');"/>
		</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<tr>
		<td align="right" width="100px">Date Acquired</td>
		<td>Skill</td>
		<td>Level</td>
		<td>Remarks</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<?php $_from = $this->_tpl_vars['skills']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['skill']):
?>
	<tr class="<?php echo smarty_function_cycle(array('values' => 'blue,notify'), $this);?>
">
		<td align="right" width="100px">
			<a href="javascript:void(0);" onclick="editSkill('<?php echo $this->_tpl_vars['skill']['staff_skills_id']; ?>
','<?php echo $this->_tpl_vars['staffId']; ?>
');"><?php echo $this->_tpl_vars['skill']['date_acquired']; ?>
</a>
		</td>
		<td><?php echo $this->_tpl_vars['skill']['skill']; ?>
</td>
		<td><?php echo $this->_tpl_vars['skill']['level']; ?>
</td>
		<td><?php echo $this->_tpl_vars['skill']['remarks']; ?>
</td>
	</tr>
	<?php endforeach; endif; unset($_from); ?>
	<tr><td colspan="4" style="padding-top:10px"><hr></td></tr>
</table>

<table border="0" width="100%">
	<tr><td nowrap><h2>Training History</h2></td></tr>
	<tr><td colspan="4"><hr></td></tr>
	<tr>
		<td align="right" width="100px">Date Acquired</td>
		<td width="300px">Course Title</td>
		<td width="200px">Trainor</td>
		<td>Remarks</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<?php $_from = $this->_tpl_vars['histories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['history']):
?>
	<tr class="<?php echo smarty_function_cycle(array('values' => 'blue,notify'), $this);?>
">
		<td align="right">
			<a href="javascript:void(0);" onclick="editStaffTraining('<?php echo $this->_tpl_vars['history']['staff_training_id']; ?>
','<?php echo $this->_tpl_vars['staffId']; ?>
');"><?php echo $this->_tpl_vars['history']['date_actual_trained']; ?>
</a>
		</td>
		<td><?php echo $this->_tpl_vars['history']['course_title']; ?>
</td>
		<td><?php echo $this->_tpl_vars['history']['actual_trainor']; ?>
</td>
		<td><?php echo $this->_tpl_vars['history']['remarks']; ?>
</td>
	</tr>
	<?php endforeach; endif; unset($_from); ?>
	<tr><td colspan="4" style="padding-top:10px"><hr></td></tr>
</table>

<script language="javascript">
	<?php echo '
		function showStaffTrainingList(staffId){
			doajaxAction("/account/getStaffTrainingList/staffId/"+staffId,0,"main_content");
		}
		function editSkill(staffSkillId, staffId){
			doajaxAction("/account/editStaffSkill/staffSkillId/"+staffSkillId+"/staffId/"+staffId,0,\'editSkill\');
			popup("editSkill");
		}
		function editStaffTraining(staffTrainingId,staffId){
			doajaxAction("/account/editStaffTraining/staffTrainingId/"+staffTrainingId+"/staffId/"+staffId,0,\'editStaffTraining\');
			popup("editStaffTraining");
		}
	'; ?>

</script>